package com.zzy.util;

import java.io.InputStream;
import java.util.Properties;

public class ZzyUtils {

    private static String getConfig(){
        System.out.println("getConfig -------------------- ");
        Properties properties = new Properties();
        InputStream in = ZzyUtils.class.getClassLoader().getResourceAsStream("config.properties");
        try{
            properties.load(in);
            return  properties.getProperty( "ml.admin.name");
        }catch (Exception e){
            e.printStackTrace();
        }
        return "";
    }

    public static String getZzy(String param1,String param2){
        System.out.println("start getZzy ");
        String result = "";
        try {
            System.out.println("try getZzy ");
            String port = getConfig();
            result = param1+ "--" + param2 + "--"  + port;
        }catch (Exception e){
            System.out.println("  -------------------- " + e.getMessage());
        }finally {
            System.out.println("finally getZzy ");
        }
        System.out.println(" end getZzy ");
        return result;
    }


}
